﻿using System.Reflection.Metadata;

namespace factory;

public class MultiShape : Shape
{
    private int sidesN;
    private double length;

    public int SidesN
    {
        private set { this.sidesN = value; }
        get { return this.sidesN; }
    }

    public double Length
    {
        private set { this.length = value;}
        get { return this.length; }
    }

    public MultiShape(int sidesN, double length)
    {
        this.Length = length;
        this.SidesN = sidesN;
    }

    public void sayType()
    {
        Console.WriteLine("this is a Equilateral polygons with " + sidesN + " edges");
    }

    public double getArea()
    {
        return (length*sidesN*sidesN)/(4*Math.Tan(Math.PI/sidesN));
    }
}